package com.golf.server.selection;

import java.util.List;

/**
 *
 * 
 * @author gfloodgate
 */
public class LobbyManager
{

	/** The singleton instance of the lobby manager, */
	private static final LobbyManager INSTANCE = new LobbyManager();
	
	
	/** The lobby that the manager is responsible. */
	private final Lobby lobby;
	
	
	/**
	 * Create the private, singleton <code>LobbyManager</code> instance. 
	 */
	private LobbyManager()
	{
		lobby = new Lobby();
	}
	
	
	/**
	 * Get the singleton manager instance.
	 * 
	 * @return The singleton lobby manager instance.
	 */
	public static LobbyManager getInstance()
	{
		return INSTANCE;
	}
	
	
	/**
	 * 
	 * 
	 * @return
	 */
	public List<Room> listRooms()
	{
		return lobby.listRooms();
	}
	
	
	/**
	 * 
	 * 
	 * @param name
	 * @param creator
	 * @return
	 */
	public Room createRoom(final String name, final User creator)
	{
		return lobby.createRoom(name, creator);
	}

}
